package com.jic.manager.api.rest;


import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.manager.request.MestorePageRequest;
import com.jic.manager.request.UccUserRequest;
import com.jic.manager.response.MestoreResponse;
import com.jic.manager.response.SysDeptResponse;
import com.jic.manager.response.UccUserResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;

/**
 * description: MemberUserRpcService
 * date: 2020/6/8 11:08
 * author: MJ
 * version: 1.0
 */
@FeignClient(name = "jic-manager",path = "/userSysDept")
public interface UserSysDeptApi {
    /**
     * 获取下级组织ID
     */
    @PostMapping("/getUserProviderAuthorDept")
    RestResult<List<SysDeptResponse>> getUserProviderAuthorDept(@RequestParam("userId") Long userId, @RequestParam("deptId") Long deptId);

    @PostMapping("/queryDeptNameById")
    RestResult<String> queryDeptNameById(Long deptId);

    /**
     * 处理事件
     * @param
     */
    @PostMapping("/getDeptList")
    List<SysDeptResponse> getDeptList();

    /**
     * 获取所有的部门
     * @param
     */
    @PostMapping("/getAllDeptList")
    List<SysDeptResponse> getAllDeptList();

    /**
     * 根据业务id 获取deptId
     * @param
     */
    @PostMapping("/getDeptIdByBusinessId")
    List<SysDeptResponse> getDeptIdByBusinessId(HashMap map);

    /**
     * 根据手机号调用uuc查询用户
     */
    @PostMapping("/getUccUserListByPhone")
    List<UccUserResponse> getUccUserListByPhone(UccUserRequest uccUserRequest);

    /**
     * 根据deptIdList获取部门
     * @param
     */
    @PostMapping("/queryListByIds")
    List<SysDeptResponse> queryListByIds(@RequestParam(value ="deptIdList" ) List<Long> deptIdList);

    /**
     * 根据accessToken 查询用户信息
     *
     * @param
     */
    @PostMapping("/queryUserInfoByAccessToken")
    UccUserResponse queryUserInfoByAccessToken(String accessToken);

    //卡奥斯查询店铺
    @PostMapping("/getStorePage")
    RestResult<PageResult<MestoreResponse>> getStorePage(MestorePageRequest mestorePageRequest);
}
